import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/recharge/queryPagePass',
    method: 'post',
    data
  })
}
export function queryEnter(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND',
    url: '/backend/account/getExpenditureAccount',
    method: 'post',
    data
  })
}
export function submit(data,type) {
  let url=type=='create'? "/backend/recharge/insert":'/backend/recharge/update'
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: url,
    method: 'post',
    data
  })
}
export function get(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/recharge/get',
    method: 'get',
    params: { id }
  })
}
